#include <iostream>

using namespace std;

void ziranzhishu(int jingdu);

int main(void)
{
	int jingdu;

	cout << "jingdu: ";
	cin >> jingdu;

	ziranzhishu(jingdu);

	return 0;
}

void ziranzhishu(int jingdu)
{
	double i;
	double e = 1;
	double j;
	double jiecheng = 1;
	for(i = 0; i < jingdu; i ++)
	{
		for(j = 0; j <= i; j++)
			jiecheng *= j + 1;
		e = e + 1 / jiecheng;
		jiecheng = 1;
	}

	cout << "e = " << e << endl;
}
